home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 March / PCWorld_2003-03_cd.bin / Software / Topware / activeperl / ActivePerl / Perl / eg / Windows Script Components / First.wsc next >
Encoding:
Extensible Markup Language  |  2000-08-10  |  1008 b   |  48 lines

  1. <?xml version="1.0"?>
  2. <component>
  3.  
  4. <registration
  5.     description="First"
  6.     progid="First.WSC"
  7.     version="1.00"
  8.     classid="{d0ccb637-bd0c-4c90-a4bd-7473f499d35a}">
  9.  
  10.     <comment>
  11.     This makes the messagebox pop up on registration and unregistation.
  12.     </comment>
  13.  
  14. </registration>
  15.  
  16. <comment> The methods and properties to expose to the data consumer.</comment>
  17. <public>
  18.     <property name="YourName">
  19.     <get internalName="hiddenGetProperty"/>
  20.     <put internalName="hiddenSetProperty"/>
  21.     </property>
  22.     
  23.     <method name="SayHello">
  24.     </method>
  25. </public>
  26.  
  27. <comment> The code that implements the functionality of the component.</comment>
  28. <script language="PerlScript">
  29. <![CDATA[
  30.     use vars qw($YourName_Property);
  31.  
  32.     sub hiddenGetProperty {
  33.     return $YourName_Property;
  34.     }
  35.  
  36.     sub hiddenSetProperty {
  37.     my($param) = shift;
  38.     $YourName_Property = $param;
  39.     }
  40.  
  41.     sub SayHello {
  42.     return "Hello $YourName_Property!";
  43.     }
  44. ]]>
  45. </script>
  46.  
  47. </component>
  48.